package com.kuang.demo.mapper;

import com.kuang.demo.bo.gh.CreateCategoryBO;
import com.kuang.demo.bo.gh.DeleteCategoryBO;
import com.kuang.demo.bo.gh.UpdateBrandBO;
import com.kuang.demo.bo.gh.UpdateCategoryBO;
import com.kuang.demo.pojo.CategoryVO;
import com.kuang.demo.vo.QueryCategoryL1VO;
import com.kuang.demo.vo.QueryCategoryVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by 郭浩 on 2020/11/2 10:06
 */
public interface CategoryMapper {
    List<QueryCategoryVO.DataBean> queryCategory();

    List<QueryCategoryL1VO.DataBean> queryL1Category();

    void insertCategory(@Param("createCategoryBO") CreateCategoryBO createCategoryBO);

    CategoryVO queryCategoryById(@Param("id") int id);

    void updateCategory(@Param("updateCategoryBO") UpdateCategoryBO updateCategoryBO);

    void deleteCategoryL2(@Param("children") List<DeleteCategoryBO.ChildrenBean> children);

    void deleteCategoryL1(@Param("id") int id);
}
